
<div id="page-wrapper">
    <!-- /.row -->
    <div class="row">
        <div class="col-sm-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <span class="judul-page">Pengarturan Tahun Ajaran</span>
                    <span class="pull-right">
                       
                        <a href="<?php echo base_url()?>mr_tapel/add" class="btn btn-warning btn-xs"><span class="glyphicon glyphicon-plus"></span>&nbsp;Tambah Tahun Ajaran</a>
                    </span>
                    <div class="clearfix"></div>
                </div>
                <div class="panel-body">
                    <div class="table-responsive">
                      <table class="table table-striped table-bordered table-hover">
                        <thead>
                            <tr>
                                <th width="50">#</th>
                                <th width="1000">Tahun Ajaran</th>
                            </tr>
                        </thead>
                        <tbody>
						<?php 
							$i = 1+$offset; 
							foreach ($hasil as $row) {
							if($row['aktif']=='ya'){
								$gambar=base_url()."content/theme/images/lamp-green.gif";
								$link=site_url('mr_tapel/set_aktif/'.$row['id_mr_th_ajaran'].'/tidak');
							}else{
								$gambar=base_url()."content/theme/images/lamp-red.gif";
								$link=site_url('mr_tapel/set_aktif/'.$row['id_mr_th_ajaran'].'/ya');
							}
						?>										
                            <tr>
                                <td><?php echo $i++ ?></td>
                                <td>
									<?php echo $row['th_ajaran']; ?> <a href="<?php echo $link;?>"><img src="<?php echo $gambar?>"></a>
									<a href="<?php echo site_url('mr_tapel/delete/'.$row['id_mr_th_ajaran']);?>" onclick="return confirm('Yakin Anda akan menghapus Th. Ajaran ini secara permanen?')" class="btn btn-danger btn-xs pull-right" title="Hapus"><span class="glyphicon glyphicon-trash"></span></a>
								</td>
                            </tr>
						<?php
							}
						?>
                        </tbody>
                      </table>
					  Keterangan: <?php echo "<img src=".base_url()."content/theme/images/lamp-green.gif>";?> Tahun Aktif <?php echo "<img src=".base_url()."content/theme/images/lamp-red.gif>";?> Tahun Tidak Aktif
                    </div>
                    <div class="clearfix"></div>
                    
 <?php
echo ! empty($pagination) ? '<center><ul class="pagination">' . $pagination . '</ul></center>' : '';
?>
                </div>
            </div>
        </div>
    </div>
    <!-- /.row -->
</div>
<!-- /#page-wrapper -->